<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition template="../templates/content.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<link rel="StyleSheet" type="text/css"
		href="#{facesContext.externalContext.requestContextPath}/css/estilos.css"
		media="screen" />

	<div class="content">
		<ui:define name="content">
<h:head>
	<title>Cadastro de Clietes</title>
	<link rel="StyleSheet" type="text/css" href="css/layout.css"
		media="screen" />
</h:head>

<h:body>
	<h:form id="form">
		<p:panel header="Cadastro de Clientes:">
			<p:messages id="msgs"/> 

			<h:panelGrid columns="4">
				<h:outputLabel value="Nome: *  " for="nome" />
				<p:inputText id="nome" value="#{cadastroBean.cadastro.nome}" required="true" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Sobrenome: *  " for="sobrenome" />
				<p:inputText id="sobrenome"
					value="#{cadastroBean.cadastro.sobrenome}" />
				<h:outputLabel value="Data de Nascimento: *  " for="dtNasc" />
				<p:inputText id="dtNasc" value="#{cadastroBean.cadastro.dtNascimento}" readonly="#{cadastroBean.readOnly}" />
				<h:outputLabel value="RG *  " for="rg" />
				<p:inputText id="rg" value="#{cadastroBean.cadastro.rg}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="CPF *  " for="cpf" />
				<p:inputText id="cpf" value="#{cadastroBean.cadastro.cpf}" readonly="#{cadastroBean.readOnly}" />

				<h:outputLabel value="CEP: *  " for="cep" />
				<p:inputText id="cep" value="#{cadastroBean.cadastro.cep}" readonly="#{cadastroBean.readOnly}" />
				<h:outputLabel value="Rua *  " for="rua" />
				<p:inputText id="rua" value="#{cadastroBean.cadastro.rua}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Número: *  " for="Nro" />
				<p:inputText id="Nro" value="#{cadastroBean.cadastro.numero}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Bairro: *  " for="bairro" />
				<p:inputText id="bairro" value="#{cadastroBean.cadastro.bairro}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Cidade: *  " for="cidade" />
				<p:inputText id="cidade" value="#{cadastroBean.cadastro.cidade}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Estado: *  " for="estado" />
				<p:inputText id="estado" value="#{cadastroBean.cadastro.estado}" readonly="#{cadastroBean.readOnly}"/>

				<h:outputLabel value="Telefone Residencial: *  " for="telRes" />
				<p:inputText id="telRes"
					value="#{cadastroBean.cadastro.telResidencial}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Telefone Comercial: *  " for="telCom" />
				<p:inputText id="telCom"
					value="#{cadastroBean.cadastro.telComercial}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Celular: *  " for="celular" />
				<p:inputText id="celular" value="#{cadastroBean.cadastro.celular}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="E-mail *  " for="email" />
				<p:inputText id="email" value="#{cadastroBean.cadastro.email}" readonly="#{cadastroBean.readOnly}"/>
				<h:outputLabel value="Observação: *  " for="obs" />
				<p:inputTextarea id="obs" cols="30" rows="3"
					value="#{cadastroBean.cadastro.obs}" readonly="#{cadastroBean.readOnly}"/>


			</h:panelGrid>
			<br></br>
			<p:commandButton value="Voltar"
				action="#{cadastroBean.voltar}" immediate="true"></p:commandButton>
			<p:commandButton value="Cadastrar Cliente"
				action="#{cadastroBean.inserirCliente}"></p:commandButton>
		</p:panel>
	</h:form>
</h:body>
</ui:define>
</div>
</ui:composition>